import React,{ Suspense } from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { HashRouter as Router, Route, Switch} from "react-router-dom"

ReactDOM.render(
  // <React.StrictMode>
  //   <App />
  // </React.StrictMode>,
  <Router>
    <Suspense fallback={ <div>路由切换，页面加载中。。。</div> }>
      {/* Switch作路由匹配 */}
      <Switch>
        <Route path="/" render={routerProps => {
          return <App { ...routerProps }/>
        }}>
        </Route>
      </Switch>
    </Suspense>
  </Router>,
  document.getElementById("root")
);

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
